package com.jnshu.dao;

import com.jnshu.dto.person.UserBindingDto;
import com.jnshu.dto.user.UserList;
import com.jnshu.dto.user.UserTo;
import com.jnshu.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    //根据id删除用户
    int deleteByPrimaryKey(Long id);
    //新增用户
    int insertSelective(User record);
    //根据id查询用户、后台查询详情
    User selectByPrimaryKey(Long id);
    //根据id修改用户
    boolean updateByPrimaryKeySelective(User record);
    //根据openId查询用户
    User selectByOpenId(String openId);
    //后台查询列表
    List<UserList> selectUserList(UserTo userTo);
    //根据手机号码查询用户
    User selectByPhone(String phone);
    //根据邮箱查询用户
    User selectByEmail(String email);
    //根据用户昵称查询用户
    User selectByNickName(String nickname,long id);

    //前台获取用户注册时间
    long selectByTime(long id);
    //查询用户绑定信息
    UserBindingDto selectUserBindingInfo(long id);


}